package com.yidu.best.bond.bondTrading.controller;

import java.io.IOException;
import java.util.HashMap;
import java.util.Map;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.multipart.MultipartFile;

import com.yidu.best.bond.bondTrading.domain.BondTradeVo;
import com.yidu.best.bond.bondTrading.service.BondTradeService;
@Controller
@RequestMapping("/Bond/")
public class BondTradeController {

	@Autowired
	private BondTradeService bondTradingService;

	@RequestMapping(value = "getBond", method = RequestMethod.GET)
	public String getBondTrad3() {
		return "bond/bond/bond";
	}


	@ResponseBody
	@RequestMapping(value = "BondTrade", method = RequestMethod.GET)
	public Map<String, Object> BondTrade(BondTradeVo bondTradeVo) {
		 Map<String, Object> bondTradeMap = bondTradingService.findPageQuery(bondTradeVo);
		return bondTradeMap;
	}
	@ResponseBody
	@RequestMapping(value = "BondTrade", method = RequestMethod.POST)
	public int insertBondTrade(MultipartFile file) throws IOException {
		return bondTradingService.insertBondTrade(file);
	}
}
